package com.fzy.core.action;

import java.util.LinkedList;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.fzy.core.BaseAction;
import com.fzy.core.BaseService;
import com.opensymphony.xwork.ActionContext;
import com.opensymphony.xwork.Preparable;

public class ListAction extends BaseAction implements Preparable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2327328982583348027L;
	private static final Log log = LogFactory.getLog(ListAction.class);
	List list;
	BaseService baseService;
	public void prepare() throws Exception {
		list = new LinkedList();
	}
	public String execute() throws Exception {
		if("1".equals(getRequestParams().get("_e")))
			list = baseService.queryMapping(getRequestParams(), getClassMapping());
		return "dispatcher:/WEB-INF/jsp/list.jsp";
    }
	public void setBaseService(BaseService baseService) {
		this.baseService = baseService;
	}
	public List getList() {
		return list;
	}
	
}
